package com.comprehensive.personalmovie.feign;

import com.comprehensive.common.po.Dictionary;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * Dictionary服务Feign客户端接口
 * 用于调用data-access-service服务的字典项管理接口
 */
@FeignClient(name = "data-access-service",contextId = "dictionaryFeignClient",path = "/dictionary")
public interface DictionaryFeignClient {
    /**
     * 根据字典类型或字典编码查询字典项
     * @param dictType 字典类型
     * @param dictCode 字典编码
     * @return 字典项列表
     */
    @GetMapping("/queryDictionariesByTypeOrCode")
    List<Dictionary> queryDictionariesByTypeOrCode(@RequestParam(required = false) String dictType, @RequestParam(required = false) String dictCode);
}